<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    var number = prompt('请问您要加几号油？');
    var capacity = parseFloat (prompt('请输入您要加的油量'));
    var price;
    if (number == '92') {
        if (capacity >= 20) {
          price = capacity * 71 / 10;
        } else {
          price = capacity * 715 / 100;
        }
      } else if (number == '95') {
        if (capacity >= 40) {
          price = capacity * 76 / 10;
        } else {
          price = capacity * 763 / 100;
        }
      } else {
        alert('我们没有这种汽油，请重新输入');
      }
      if (price > 0) {
            document.write('您加的汽油是' + number + '号汽油，共计' + capacity + '升，总价格' + price + '元');
        }


  </script>
</body>
</html>